//
//  MusicModel.m
//  艾听歌
//
//  Created by dllo on 16/5/17.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "MusicModel.h"

@implementation MusicModel


- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    
}

-(void)setData:(NSMutableArray *)data
{
    _data = data;
   
    
    NSMutableArray *array = [NSMutableArray array];
    for (NSDictionary *dic in data) {
//        if ([dic.class isSubclassOfClass:[NSDictionary class]]) {
//            MusicSmallModel *MusicModel = [[MusicSmallModel alloc] init];
//            [MusicModel setValuesForKeysWithDictionary:dic];
//            [array addObject:MusicModel];
//        } else {
//            array = data;
//        }
        MusicSmallModel *MusicModel = [[MusicSmallModel alloc] init];
        [MusicModel setValuesForKeysWithDictionary:dic];
        [array addObject:MusicModel];
        
    }
    _data = [NSMutableArray arrayWithArray:array];

}



@end
